<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Blank Page - SB Admin</title>

    <!-- Bootstrap core CSS -->
    <link href="resources/css/bootstrap.css" rel="stylesheet">
    <link href="resources/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="resources/font-awesome/css/font-awesome.min.css">
  </head>

  <body>

    <div id="wrapper">

      <!-- Sidebar -->
      <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          	<a class="navbar-brand" href="index.html">THAI NGUYEN HOTEL MANAGEMENT SYSTEM</a>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse navbar-ex1-collapse">
				<ul class="nav navbar-nav side-nav">
					<li><a href="dashboard"><i
							class="fa fa-dashboard"></i> Trang chính</a></li>
					<!--             <li><a href="charts.html"><i class="fa fa-bar-chart-o"></i> Charts</a></li> -->
					<li  class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown"><i class="fa fa-caret-square-o-down"></i>
							Cập nhật dữ liệu nhà nghỉ <b class="caret"></b></a>
						<ul class="dropdown-menu" >
							<li><a href="roommanager">Cập nhật thông tin phòng</a></li>
							<li><a href="servicemanager">Cập nhật dịch vụ</a></li>
						</ul></li>
					<li  class="active"><a href="roomusing"><i class="fa fa-edit"></i> Quản
							lý phòng</a></li>
					<li><a href="history"><i class="fa fa-desktop"></i> Lịch
							sử giao dịch</a></li>
					<li><a href="<c:url value="customer"></c:url>"><i class="fa fa-wrench"></i> Danh sách khách hàng</a></li>
				</ul>

          <ul class="nav navbar-nav navbar-right navbar-user">
            <li class="dropdown messages-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-envelope"></i> Messages <span class="badge">7</span> <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li class="dropdown-header">7 New Messages</li>
                <li class="message-preview">
                  <a href="#">
                    <span class="avatar"><img src="http://placehold.it/50x50"></span>
                    <span class="name">John Smith:</span>
                    <span class="message">Hey there, I wanted to ask you something...</span>
                    <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span>
                  </a>
                </li>
                <li class="divider"></li>
                <li class="message-preview">
                  <a href="#">
                    <span class="avatar"><img src="http://placehold.it/50x50"></span>
                    <span class="name">John Smith:</span>
                    <span class="message">Hey there, I wanted to ask you something...</span>
                    <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span>
                  </a>
                </li>
                <li class="divider"></li>
                <li class="message-preview">
                  <a href="#">
                    <span class="avatar"><img src="http://placehold.it/50x50"></span>
                    <span class="name">John Smith:</span>
                    <span class="message">Hey there, I wanted to ask you something...</span>
                    <span class="time"><i class="fa fa-clock-o"></i> 4:34 PM</span>
                  </a>
                </li>
                <li class="divider"></li>
                <li><a href="#">View Inbox <span class="badge">7</span></a></li>
              </ul>
            </li>
            <li class="dropdown alerts-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bell"></i> Alerts <span class="badge">3</span> <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="#">Default <span class="label label-default">Default</span></a></li>
                <li><a href="#">Primary <span class="label label-primary">Primary</span></a></li>
                <li><a href="#">Success <span class="label label-success">Success</span></a></li>
                <li><a href="#">Info <span class="label label-info">Info</span></a></li>
                <li><a href="#">Warning <span class="label label-warning">Warning</span></a></li>
                <li><a href="#">Danger <span class="label label-danger">Danger</span></a></li>
                <li class="divider"></li>
                <li><a href="#">View All</a></li>
              </ul>
            </li>
            <li class="dropdown user-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> John Smith <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="#"><i class="fa fa-user"></i> Profile</a></li>
                <li><a href="#"><i class="fa fa-envelope"></i> Inbox <span class="badge">7</span></a></li>
                <li><a href="#"><i class="fa fa-gear"></i> Settings</a></li>
                <li class="divider"></li>
                <li><a href="#"><i class="fa fa-power-off"></i> Log Out</a></li>
              </ul>
            </li>
          </ul>
        </div><!-- /.navbar-collapse -->
      </nav>

      <div id="page-wrapper">

        <div class="row">
				<div class="col-lg-12">
					<h1>
						Thuê phòng <small>Danh sách phòng</small>
					</h1>
					<ol class="breadcrumb">
						<li class="active"><i class="icon-file-alt"></i> Danh sách phòng </li>
					</ol>
				</div>
				<div class="col-lg-12">
					<div id="col-lg-6">
						<label class="text-primary">Tầng 1</label><br>
						<c:forEach items="${roomList}" var="emp">
							<c:if test="${emp.room_floor == 1}">
								<a style="margin-left: 10px;" href="roomusing/${emp.room_id}">
									<span <c:set var="result" value="0"/>
									<c:forEach items="${ruList}" var="ru">
										<c:choose>
											<c:when test="${emp.room_id==ru.room_id}">
												<c:set var="result" value="1"/>
											</c:when>
  										</c:choose>
									</c:forEach>
									<c:if test="${result == 1}">
  												class="btn btn-danger btn-lg"
  											</c:if>
									<c:if test="${result == 0}">
  												class="btn btn-success btn-lg"
  											</c:if>>${emp.room_id}</br>
  											${emp.room_price} .VND
  											</span>
								</a>
							</c:if>
						</c:forEach>
					</div>
					<div id="col-lg-6">
					<br>
						<label class="text-primary">Tầng 2</label><br>
						<c:forEach items="${roomList}" var="emp">
							<c:if test="${emp.room_floor == 2}">
								<a style="margin-left: 10px;" href="roomusing/${emp.room_id}">
									<span <c:set var="result" value="0"/>
									<c:forEach items="${ruList}" var="ru">
										<c:choose>
											<c:when test="${emp.room_id==ru.room_id}">
												<c:set var="result" value="1"/>
											</c:when>
  										</c:choose>
									</c:forEach>
									<c:if test="${result == 1}">
  												class="btn btn-danger btn-lg"
  											</c:if>
									<c:if test="${result == 0}">
  												class="btn btn-success btn-lg"
  											</c:if>>${emp.room_id}</br>
  											${emp.room_price} .VND
  											</span>
								</a>
							</c:if>
						</c:forEach>
					</div>
					
					<div id="col-lg-6">
						<br>
						<label class="text-primary">Tầng 3</label><br>
						<c:forEach items="${roomList}" var="emp">
							<c:if test="${emp.room_floor == 3}">
								<a style="margin-left: 10px;" href="roomusing/${emp.room_id}">
									<span <c:set var="result" value="0"/>
									<c:forEach items="${ruList}" var="ru">
										<c:choose>
											<c:when test="${emp.room_id==ru.room_id}">
												<c:set var="result" value="1"/>
											</c:when>
  										</c:choose>
									</c:forEach>
									<c:if test="${result == 1}">
  												class="btn btn-danger btn-lg"
  											</c:if>
									<c:if test="${result == 0}">
  												class="btn btn-success btn-lg"
  											</c:if>>${emp.room_id}</br>
  											${emp.room_price} .VND
  											</span>
								</a>
							</c:if>
						</c:forEach>
					</div>
					
					<div id="col-lg-6">
						<br>
						<label class="text-primary">Tầng 4</label><br>
						<c:forEach items="${roomList}" var="emp">
							<c:if test="${emp.room_floor == 4}">
								<a style="margin-left: 10px;" href="roomusing/${emp.room_id}">
									<span <c:set var="result" value="0"/>
									<c:forEach items="${ruList}" var="ru">
										<c:choose>
											<c:when test="${emp.room_id==ru.room_id}">
												<c:set var="result" value="1"/>
											</c:when>
  										</c:choose>
									</c:forEach>
									<c:if test="${result == 1}">
  												class="btn btn-danger btn-lg"
  											</c:if>
									<c:if test="${result == 0}">
  												class="btn btn-success btn-lg"
  											</c:if>>${emp.room_id}</br>
  											${emp.room_price} .VND
  											</span>
								</a>
							</c:if>
						</c:forEach>
					</div>
					
					<div id="col-lg-6">
						<br>
						<label class="text-primary">Tầng 5</label><br>
						<c:forEach items="${roomList}" var="emp">
							<c:if test="${emp.room_floor == 5}">
								<a style="margin-left: 10px;" href="roomusing/${emp.room_id}">
									<span <c:set var="result" value="0"/>
									<c:forEach items="${ruList}" var="ru">
										<c:choose>
											<c:when test="${emp.room_id==ru.room_id}">
												<c:set var="result" value="1"/>
											</c:when>
  										</c:choose>
									</c:forEach>
									<c:if test="${result == 1}">
  												class="btn btn-danger btn-lg"
  											</c:if>
									<c:if test="${result == 0}">
  												class="btn btn-success btn-lg"
  											</c:if>>${emp.room_id}</br>
  											${emp.room_price} .VND
  											</span>
								</a>
							</c:if>
						</c:forEach>
					</div>
					
					<div id="col-lg-6">
						<br>
						<label class="text-primary">Tầng 6</label><br>
						<c:forEach items="${roomList}" var="emp">
							<c:if test="${emp.room_floor == 6}">
								<a style="margin-left: 10px;" href="roomusing/${emp.room_id}">
									<span <c:set var="result" value="0"/>
									<c:forEach items="${ruList}" var="ru">
										<c:choose>
											<c:when test="${emp.room_id==ru.room_id}">
												<c:set var="result" value="1"/>
											</c:when>
  										</c:choose>
									</c:forEach>
									<c:if test="${result == 1}">
  												class="btn btn-danger btn-lg"
  											</c:if>
									<c:if test="${result == 0}">
  												class="btn btn-warning btn-lg"
  											</c:if>>${emp.room_id} [VIP]</br>
  											${emp.room_price} .VND
  											</span>
								</a>
							</c:if>
						</c:forEach>
					</div>
				</div>
			</div><!-- /.row -->
		
      </div><!-- /#page-wrapper -->

    </div><!-- /#wrapper -->

    <!-- JavaScript -->
    <script src="resources/js/jquery-1.10.2.js"></script>
    <script src="resources/js/bootstrap.js"></script>

  </body>
</html>